
import { BasicColumn } from '@/components/Table';
import { NTag } from 'naive-ui';
import { h } from 'vue';
export interface ListData {
  cor: string;
  flightNum: string;
  desk: string;
  startTime: string;
  endTime: string;
  baggage: string;
  status: number;
}
export const columns: BasicColumn<ListData>[] = [
  {
    title: '航司',
    key: 'cor',
    width: 150,
  },
  {
    title: '值机柜台',
    key: 'desk',
    width: 150,
  },
  {
    title: '实际起飞时间',
    key: 'startTime',
    ifShow: (_column) => {
      return true; // 根据业务控制是否显示
    },
    width: 250,
  },
  {
    title: '实际降落时间',
    key: 'endTime',
    width: 250,
  },
  {
    title: '行李转盘',
    key: 'baggage',
    width: 150,
  },
  {
    title: '申请状态',
    key: 'status',
    render(row) {
      return h(
        NTag,
        {
          type: row.status ? 'success' : 'error',
        },
        {
          default: () => (row.status ? '已处理' : '未处理'),
        }
      );
    },
  }
];
